package com.treasure.mall.zbqmallapi.vo.auction;

import com.treasure.mall.biz.entity.auction.AuctionBidLogPO;
import com.treasure.mall.biz.vo.BaseVO;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/7/21
 */
@Data
public class AuctionBidLogVO implements BaseVO {
    private static final long serialVersionUID = 7633307223226688019L;
    private Long id;
    private String nickname;
    private String userFace;
    /**
     * 拍卖id
     */
    private Long sessionId;
    /**
     * 出价金额
     */
    private BigDecimal bidAmount;

    private LocalDateTime createTime;

    private Long userId;

    private BigDecimal validPayOrderSum = BigDecimal.ZERO;


    public AuctionBidLogVO(AuctionBidLogPO logPO) {
        this.id = logPO.getId();
        this.nickname = logPO.getUserPO().getNickName();
        this.userFace = logPO.getUserPO().getAvatar();
        this.userId = logPO.getUserPO().getUserId();
        this.validPayOrderSum = logPO.getUserPO().getValidPayOrderSum();
        this.sessionId = logPO.getSessionId();
        this.bidAmount = logPO.getBidAmount();
        this.createTime = logPO.getCreateTime();
    }
}
